package Heap;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 阿宾
 * Date: 2024-12-07
 * Time: 15:34
 */
public class MyHeapTest {
    public static void main(String[] args) {

        MyHeap myHeap = new MyHeap();
        int[] array = {27,15,19,18,28,34,65,49,25,37};
        //初始化堆
        myHeap.InitHeap(array);

        //堆排序
        myHeap.HeapSort();
        System.out.println("================");
        /*//构建大顶堆
        myHeap.BuildMaxHeap();

        //向大根堆中插入元素
        myHeap.offer(5);
        myHeap.offer(20);
        myHeap.offer(30);

        int ret = myHeap.poll();
        System.out.println(ret);
        int ret1 = myHeap.poll();
        System.out.println(ret1);
        System.out.println("==========");*/

    }
}
